import { ref } from 'vue';

const useApplyForRefund = () => {

    const applyForRefundVisible = ref(false);
    const refundObj = ref<any>();
    const refundInformationVisible = ref(false);

    /** 打开 申请退款 弹窗 */
    const hanleOpenRefund = async (row?: any) => {
        refundObj.value = row;
        applyForRefundVisible.value = true;
    };

    /** 打开 退款信息 弹窗 */ 
    const hanleOpenRefundInformation = async (row?: any) => {
        refundObj.value = row;
        refundInformationVisible.value = true;
    };


    return {
        applyForRefundVisible,
        refundObj,
        refundInformationVisible,
        hanleOpenRefundInformation,
        hanleOpenRefund,
    }
};

export default useApplyForRefund;
